<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <link rel="stylesheet" href="./index.css" />
    <!-- 引入vue.js -->
    <script src="/node_modules/vue/dist/vue.global.js"></script>
    <!-- 引入axios -->
    <script src="/node_modules/axios/dist//axios.min.js"></script>
    <!--引入lodash -->
    <script src="/node_modules/lodash/lodash.min.js"></script>
  </head>
  <body>
    <!-- 创建页面容器 -->
    <div id="app">
      <div class="container" @click="getHeroList">
        <!-- 上面搜索部分 -->
        <div class="search">
          <div class="title">
            <p>综合</p>
            <p>定位</p>
          </div>
          <div class="types">
            <div class="type-list">
              <div class="radio" :class="checked===10?'checked':''" @click="changeProperty('pay_type',10)">本周免费</div>
              <div class="radio" :class="checked===11?'checked':''" @click="changeProperty('pay_type',11)">新手推荐</div>
            </div>
            <div class="type-list">
              <div class="radio" :class="checked===0?'checked':''" @click="changeProperty('hero_type',0)">全部</div>
              <div class="radio" :class="checked===3?'checked':''" @click="changeProperty('hero_type',3)">坦克</div>
              <div class="radio" :class="checked===1?'checked':''" @click="changeProperty('hero_type',1)">战士</div>
              <div class="radio" :class="checked===4?'checked':''" @click="changeProperty('hero_type',4)">刺客</div>
              <div class="radio" :class="checked===2?'checked':''" @click="changeProperty('hero_type',2)">法师</div>
              <div class="radio" :class="checked===5?'checked':''" @click="changeProperty('hero_type',5)">射手</div>
              <div class="radio" :class="checked===6?'checked':''" @click="changeProperty('hero_type',6)">辅助</div>
            </div>
          </div>
          <div class="keyword">
            <div class="input">
              <input type="text" placeholder="请输入你要搜索的英雄名" :value="keyword" @input="changeKeyword" />
            </div>
          </div>
        </div>

        <!-- 下面列表展示部分 -->
        <ul class="list">
          <li v-for="hero in filterHeros" :key="hero.ename">
            <a :href="heroA(hero.ename)" target="_blank">
              <img :src="heroImg(hero.ename)" />
              <!-- <span>{{hero.cname}}</span> -->
              <span v-html="hero.cname"></span>
            </a>
          </li>
        </ul>
      </div>
    </div>

    <!-- 引入js文件 -->
    <script src="./index.js"></script>
  </body>
</html>
